﻿@{
    Layout = "../Shared/_InnerPage.cshtml";
}
@model XoohooViewModelItem<BulletinInput>
@section TitleContent{
    @Html.SiteTitle("系统管理", "系统公告")
}
@section HeadCustom
{
    @{
        Html.RenderScriptTag("Scripts/ckeditor/ckeditor.js");
        Html.RenderScriptTag("Scripts/ckfinder/ckfinder.js");
    }
    <script type="text/javascript">
    //<![CDATA[
        $(document).ready(function () {
            var editorDetail = CKEDITOR.replace('Content');
            var ckfinerFolder = "@Url.ScriptPath("Scripts/ckfinder/ckfinder.js",ViewContext)".replace("ckfinder.js","");
            CKFinder.SetupCKEditor(editorDetail, ckfinerFolder);
            CKEDITOR.instances["Content"].on("instanceReady", function () {
                //set keyup event   
                this.document.on("keyup", updateTextArea);
                //and paste event   
                this.document.on("paste", updateTextArea);

            });

            function updateTextArea() {
                CKEDITOR.tools.setTimeout(function () {
                    $("#Content").val(CKEDITOR.instances.Content.getData());
                    $("#Content").trigger('keyup');
                }, 0);
            }
        });
    //]]>
    </script>

}
@section NavigationContent
{
    当前位置：用户管理 &gt;&gt; 权限管理 &gt;&gt; 权限编辑
}
@{
    BulletinInput bulletin = Model.Item;
}
@{Html.BeginRouteForm("Admin.System.Bulletin", FormMethod.Post, new { @id = "BulletinForm", @name = "BulletinForm" });}
@Html.XoohooAntiForgeryToken()
<table cellpadding="4" cellspacing="0" class="tbl">
    <tr>
        <td class="tit">
            公告标题：
        </td>
        <td>
            @Html.TextBoxFor(bulletin, item => item.Title, new { @class = "input" })
            @Html.ValidationMessageFor(bulletin, item => item.Title, "请输入公告标题")
        </td>
    </tr>
    <tr>
        <td class="tit">
            公告内容：
        </td>
        <td>
            @Html.TextAreaFor(bulletin, item => item.Content)
            <br />
            @Html.ValidationMessageFor(bulletin, item => item.Content, "请输入公告内容")
        </td>
    </tr>
    <tr>
        <td class="tit">
            发布时间：
        </td>
        <td>
            @Html.TextBoxFor(bulletin, item => item.PublishDate, new { @class = "input80 valignmiddle sdate" })
            @Html.ValidationMessageFor(bulletin, item => item.PublishDate, "请输入发布时间")
        </td>
    </tr>
    <tr>
        <td class="tit">
            是否显示：
        </td>
        <td>
            @Html.CheckBoxFor(bulletin, item => item.IsShow)<label for="IsShow">显示</label>
        </td>
    </tr>
    <tr>
        <td class="tit">
        </td>
        <td>
            @Html.ImageButton("btnSubmit", "Styles/Images/btnSubmit.jpg")
        </td>
    </tr>
</table>
@{Html.EndForm();}
